package com.ddedu.service.impl;

import com.ddedu.dao.AskForLeaveDao;
import com.ddedu.entity.AskForLeave;
import com.ddedu.service.AskForLeaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LeaveServiceImpl implements AskForLeaveService {

    @Autowired
    private AskForLeaveDao leaveDao;

    /**
     * 请假申请
     * @param askForLeave 页面的信息
     */
    @Override
    public void insertAskForLeave(AskForLeave askForLeave) {
        if (askForLeave == null) {
            throw new RuntimeException("数据异常");
        }
        leaveDao.insertAskForLeave(askForLeave);
    }
}
